package errs

type MyAPIError struct {
	RequestUrl string      `json:"request_url"`
	Code       int         `json:"code"`
	Msg        string      `json:"msg"`
	Data       interface{} `json:"data"`
}

func (e MyAPIError) Error() string {
	return e.Msg
}

func NewMyAPIError(code int, msg string) MyAPIError {
	myAPIError := MyAPIError{}
	myAPIError.Code = code
	myAPIError.Msg = msg
	return myAPIError
}
